package com.hrl.service.impl;

import com.hrl.dao.EmpDao;
import com.hrl.domain.Employee;
import com.hrl.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmpServiceImpl implements EmpService {
    @Autowired
    private EmpDao empDao;

    @Override
    public List<Employee> findAll() {
        return empDao.findAll();
    }

    @Override
    public Employee findById(Integer emp_id) {
        return empDao.findById(emp_id);
    }

    @Override
    public void save(Employee employee) {
        empDao.save(employee);
    }

    @Override
    public void update(Employee employee) {
        empDao.update(employee);
    }

    @Override
    public void delete(Integer emp_id) {
        empDao.delete(emp_id);
    }
}
